import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            redirect: '/datasource',
            component: () => import('@/views/home/index.vue'),
            children: [
                {
                    path: 'datasource',
                    name: '数据源',
                    component: () => import('@/views/datasources/index.vue'),
                    children: [
                        {
                            path: "vector",
                            name: "矢量数据",
                            component: () => import('@/views/datasources/vector/index.vue')
                        },
                        {
                            path: "grid",
                            name: "栅格数据",
                            component: () => import("@/views/datasources/grid/index.vue")
                        }
                    ]
                }
            ]
        }
    ]
})

export default router
